package scuts.core;
import scuts.core.types.LazyIterator;


class ElemLazyIterator 
{
  public static inline function elem < T > (it:LazyIterator<T>, e:T) {
    return ElemIterator.elem(it(), e);
  }
}

class ElemIterable 
{
  public static inline function elem < T > (it:Iterable<T>, e:T) {
    return ElemIterator.elem(it.iterator(), e);
  }
}

class ElemIterator {
   public static function elem < T > (it:Iterator<T>, e:T) {
    for ( e1 in it)  {
      if (e1 == e) return true;
    }
    return false;
  }
}